<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<script src="${pageContext.request.contextPath}/js/Echarts/china.js"></script>
<style>
.btnarea{
    margin-left: -10%;
    padding-top: 12px;
    width:100%;
}

.labelstyle{
    font-weight: bold;
    font-size: 11px;
}
</style>

<div ng-controller="warningContectsController as controller">
	<div class="wrap">
		<div class="mapTips">
			<h6>
				<i class="glyphicon glyphicon-cog"></i> <span>条件设置</span>
			</h6>
		</div>
		<div class="conditionWrap">
			<div class="wrapFirst" style="height: 57px; margin-bottom: 50px;margin-top: 10px">
				<form role="form" name="tableForm" class="form-horizontal">
					<div class="form-group">
						<div class="row">
							<div class="col-md-10 col-sm-10 col-xs-10">
								<label for="input-userNo_search" class="control-label labelstyle"
									style="padding: 19px 10px 0 30px;float:left;">IP:</label>
								<div class=""
									style="width: 28%; margin-top: 10px;float:left; margin-left:1%">
									<input ng-model="queryParameter" type="text"
										class="form-control" id="input-userNo_search" placeholder="0.0.0.0">
								</div>	
							</div>
							<div class="col-md-2 col-sm-2 col-xs-2" >
								<div class="btnarea">
									<button type="button" class="btn btn-primary" style="margin-right:6px; width:39%"
									ng-click="controller.search()"> 搜索
									</button>
									<button type="button" class="btn btn-danger"  style="width:39%" ng-click="controller.reset()"> <!-- <i
										class="fa fa-search"></i> -->重置
									</button>
								</div>
							</div>
						</div>
						
						<div style="padding: 19px 0 0 15px;">
							<button class="btn btn-default"
								style="float:left;margin-right:8px;" type="button" 
									ng-click="controller.insertConfig();">新增配置</button>
						</div>
						<div style="float:left;margin-right:8px;">
							<button class="btn btn-default" type="button"
								ng-click="controller.saveConfig()">保存配置</button>
						</div>
						<div style="float:left;">
							<button class="btn btn-default" type="button"
								ng-click="controller.delConfig();">删除配置</button>
						</div>
						
					</div>
					<div class="form-group"></div>
				</form>
			</div>


		</div>

		<div class="mapBottom table-bordered"
			style="font-size: 13px; background: white;    overflow: auto;">
			<table class="table table-bordered" style="font-size: 13px;width:1900px">
				<tr>
					<td style="width: 1%;"><input type="checkbox" id="check_all" /></td>
					
					<th>IP</th>
					<th>预警联系人</th>
					<th>预警联系类型</th>
					<th>预警联系人电话</th>
					<th>预警联系人邮箱</th>
					<th>危险联系人</th>
					<th>危险联系类型</th>
					<th>危险联系人电话</th>
					<th>危险联系人邮箱</th>
					<th>严重联系人</th>
					<th>严重联系人类型</th>
					<th>严重联系人电话</th>
					<th>严重联系人邮箱</th>
				</tr>

				<tr ng-repeat="data in controller.warningDataList">
					<td><input type="checkbox" class="check_item" /></td>
					
					<td>
					<input type="hidden"  value={{data.id}} id="id">
<!-- 						<select class="selectpicker" id="ip_sel"> -->
<!-- 							<option ng-repeat="newip in data.ip" value={{newip}}>{{newip}}</option> -->
<!-- 						</select> -->
					<button class="btn btn-default"
							style="height: 21px; width: 89%; padding: 0px 0px; font-size: 1px;"
							type="button" ng-click="controller.selectIP(data.id);">选择IP</button>
						<input ng-hide="true" type=text  class="form-control" id="ip_{{data.id}}" value="">
					</td>
					<td>
						<input type="text"
								class="form-control" id="warncontact"  value={{data.warncontact}} style="height:21px;width: 89%;padding: 0px 0px;font-size: 1px">
					</td>
					<td>
						<select class="selectpicker" id="warncontype_sel">
							<option ng-repeat="newwarncontype in data.warncontype" value={{newwarncontype.typeId}}>{{newwarncontype.typeName}}</option>
						</select>
					</td>
					<td><input type="text"
								class="form-control" id="warnphone"  value={{data.warnphone}} style="height:21px;width: 89%;padding: 0px 0px;font-size: 1px"></td>
					<td><input type="text"
								class="form-control" id="warnemail" value={{data.warnemail}} style="height:21px;width: 89%;padding: 0px 0px;font-size: 1px"></td>
					<td><input type="text"
								class="form-control" id="dangercontact" value={{data.dangercontact}} style="height:21px;width: 89%;padding: 0px 0px;font-size: 1px">
					</td>
					<td>
						<select class="selectpicker" id ="dangercontype_sel">
							<option ng-repeat="newdangercontype in data.dangercontype" value={{newdangercontype.typeId}}>{{newdangercontype.typeName}}</option>
						</select>
					</td>
					<td><input type="text"
								class="form-control" id="dangerphone" value={{data.dangerphone}} style="height:21px;width: 89%;padding: 0px 0px;font-size: 1px"></td>
					<td><input type="text"
								class="form-control" id="dangeremail" value={{data.dangeremail}} style="height:21px;width: 89%;padding: 0px 0px;font-size: 1px"></td>
					<td>
					<input type="text"
								class="form-control" id="seriouscontact" value={{data.seriouscontact}} style="height:21px;width: 89%;padding: 0px 0px;font-size: 1px">
					</td>
					<td>
						<select class="selectpicker" id="seriouscontype_sel">
							<option ng-repeat="newseriouscontype in data.seriouscontype" value={{newseriouscontype.typeId}}>{{newseriouscontype.typeName}}</option>
						</select>
					</td>
					<td><input type="text"
								class="form-control" id="seriousphone" value={{data.seriousphone}} style="height:21px;width: 89%;padding: 0px 0px;font-size: 1px"></td>
					<td><input type="text"
								class="form-control" id="seriousemail" value={{data.seriousemail}}  style="height:21px;width: 89%;padding: 0px 0px;font-size: 1px"></td>			

				</tr>
				
			</table>



		</div>
					<div class="spagination "
				style="left: 305px; top: -12px; float: left; width: 1105px; position: relative;">
<!-- 				分页文字信息  -->
				<div class=""
					style="top: 25px; width: 100px; position: absolute; right: 1078px; float: left;">总
					{{controller.paginationInfo.totalElements}}条记录</div>
				<div style="position: absolute; left: 0px;">
					<ul uib-pagination
						total-items="controller.paginationInfo.totalPages"
						ng-model="controller.queryCondition.page"
						max-size="controller.paginationInfo.maxSize" class="pagination-md"
						boundary-links="true" items-per-page="1" rotate="false"
						ng-change="controller.pageChanged();" previous-text="上一页"
						next-text="下一页" first-text="首页" last-text="最后一页"></ul>
					<div class="col-md-1"
						style="top: 27px; left: 98%; width: 117px; position: absolute;">
						跳转
						<div class="col-md-1"
							style="left: 29%; float: left; top: 21px; position: absolute;">
							<input ng-model="controller.queryCondition.forwordPage"
								ng-keyup="enterEvent($event)" type="text" class="form-control"
								style="height: 33px; width: 50px; top: -28px; position: absolute;">
						</div>
						<div style="position: absolute; top: 0px; left: 94%;">页</div>

					</div>
				</div>
			</div>
	</div>
</div>
<script type="text/javascript">
	$('.wrap').resize(function() {

	});
</script>